home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM57.C < prev    next >
C/C++ Source or Header  |  1991-03-13  |  674b  |  21 lines

  1.       #include "window.h"
  2.       #include <string.h>
  3.  
  4.       #define NORM CREATE_VIDEO_ATTRIBUTE(black,white)
  5.       #define DATEMASK "__/__/__"
  6.       char buf1[] = "12/34/56";
  7.       char buf2[9];
  8.       WPOINTER w;
  9.  
  10.       main()
  11.       {
  12.         memset(buf2,0,sizeof(buf2));
  13.         WindowInitializeSystem();
  14.         WindowSaveInitial(0);
  15.         w = WindowInitialize(BORDER,1,1,40,10,NORM,NORM,SINGLEBOX);
  16.         WindowOpen(w);
  17.         WindowDisplay(w,1,NOEFFECT);
  18.         TranslateMaskStringToString(buf1,DATEMASK,buf2,'_');
  19.         WindowPrintf(w,"The original string is %s\n"
  20.                        "The untranslated string is %s\n", buf1,buf2);
  21.       }